<template>
  <svg aria-hidden="true" :width="props.size" :height="props.size">
    <use class="svg-icon" :xlink:href="symbolId" :fill="props.color" />
  </svg>
</template>

<script setup>
import { computed, defineProps } from "vue";
import ids from "virtual:svg-icons-names";

const props = defineProps({
  prefix: {
    type: String,
    default: "icon"
  },
  name: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: "#bcc1cb"
  },
  size: {
    type: String,
    default: "1em"
  }
});

const symbolId = computed(() => `#${props.prefix}-${props.name}`);
</script>

<style lang="postcss"></style>
